package com.person.commons.struts2;

import java.util.List;
import java.util.Locale;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.person.commons.utils.FlipPageInfo;

/**
 * @author liuying
 * 
 */
public abstract class BaseAction extends ActionSupport implements
		ServletResponseAware, ServletRequestAware, SessionAware {
   
	protected HttpServletResponse response;
	protected HttpServletRequest request;
	protected Map session;
	
	// 预定义逻辑视图常量
	public final static String CREATE = "create";
	public final static String LIST = "list";
	public final static String MODIFY = "modify";
	public final static String DETAIL = "detail";
	public final static String INDEX = "index";
	public final static String CREATE_SUCCESS = "create_success";
	public final static String MODIFY_SUCCESS = "modify_success";
	public final static String DELETE_SUCCESS = "delete_success";
	public final static String QUERY = "query";
	
	//传到页面的提示信息
	public String info = "";

	
	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public void setServletResponse(HttpServletResponse response) {
		this.response = response;
	}

	public void setServletRequest(HttpServletRequest request) {
		this.request = request;
	}

	public void setSession(Map session) {
		this.session = session;
	}

	public HttpServletResponse getResponse() {
		return response;
	}

	public void setResponse(HttpServletResponse response) {
		this.response = response;
	}

	public HttpServletRequest getRequest() {
		return request;
	}

	public void setRequest(HttpServletRequest request) {
		this.request = request;
	}

	public Map getSession() {
		return session;
	}

}
